import java.util.Scanner;

public class 字符提取 {
    mport java.util.Scanner;

public class 字符提取 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s1 = scanner.nextLine();
        String s2 = scanner.nextLine();

        // 提取第一个不含空格的子字符串
        String firstWord = s1.split(" ")[0];

        System.out.println(firstWord);
        System.out.println(s2);

        scanner.close();
    }
}
}
